package Service.Impl;

import Dao.BerthDao;
import POJO.Berth;
import POJO.InputPOJO.BerthBindInput;
import POJO.InputPOJO.BerthInput;
import POJO.Vo.BerthVo;
import Service.BerthService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BerthServiceImpl implements BerthService {

    @Resource
    BerthDao berthDao;

    /*病床新增*/
    @Override
    public void insertBerth(Berth berth)
    {
        berthDao.insertBerth(berth);
    }

    /*病床查询*/
    @Override
    public List<BerthVo> selectBerth(BerthInput berthInput) {
        return berthDao.selectBerth(berthInput);
    }


    /*分页 ，total查询*/
    @Override
    public int selectBerthTotal(BerthInput berthInput)
    {
        return berthDao.selectBerthTotal(berthInput);
    }

    @Override
    public BerthVo selectBerthByBerth(Berth berth) {
        return berthDao.selectBerthByBerth(berth);
    }

    @Override
    public void deleteBerthById(int berthId) {
        berthDao.deleteBerthById(berthId);
    }

    @Override
    public BerthVo selectBerthById(int berthId){
        return berthDao.selectBerthById(berthId);
    }

    @Override
    public void berthBind(BerthBindInput berthBindInput) {
        berthDao.berthBind(berthBindInput);
    }

}
